package com.rd.teacher.jichao.day02;

public class OuterCls1 {

    private String prop1 = "prop1";
    private static String prop2 = "prop2";

    public void info(){
        new InnerCls1().info();
        System.out.println("---------");
        new InnerCls2().info();
//        InnerCls2.info();
    }

    // 非静态
    class InnerCls1{
        public void info(){
            System.out.println(prop1);
            System.out.println(prop2);
        }
    }

    // 静态
    // 内部类拥有静态方法的前提是，内部类也是静态的
    static class InnerCls2{
        public static void info(){
            System.out.println(prop2);
        }
    }

    public static void main(String[] args) {
        new OuterCls1().info();
    }
}
